﻿using System;

namespace dPet.Application.Jobs
{
	using dPet.Application.Services;
	using Hangerd.Components;
	using Quartz;

	public class InventoryMonitorJob : IJob, IDisposable
	{
		public void Execute(IJobExecutionContext context)
		{
			var invoicingService = LocalServiceLocator.GetService<IInventoryService>();

			if (invoicingService != null)
			{
				invoicingService.CheckProductInventory();
			}

			LocalLoggingService.Info("InventoryMonitorJob executed");
		}

		public void Dispose()
		{
			//todo: dispose unit of work
		}
	}
}
